<!-- 提交记录 -->
<template>
	<view class="submitRecords">
		<view class="records" v-for="(item,index) in submitList" :key="index" @click="godetail(item.id)">
			
				<view class="start">开始时间  : {{item.startTime}}</view>
				<view class="finish">结束时间  : {{item.endTime}}</view>
				<view>
					<text class="moneycount">总金额  :</text>
					<text class="texts">{{item.total}}</text>
					<text class="detail" style="position: absolute;right: 40upx;" >查看详情</text>
				</view>
			
		</view>
	</view>
	
</template>

<script>
	export default {
		data() {
			return {
				submitList:[],
			}
		},
		onLoad() {
			this.getsubmitRecords()
		},
		methods: {
			getsubmitRecords(){
				uni.request({
					url:this.$serverUrl + '/app/hospital/fundSubmitRecord/list', //仅为示例，并非真实接口地址。
					data: {
						'pageNumber':1,
						'pageSize':10
					},
					method:"POST",
					header:{
						'token': uni.getStorageSync('token'),
						'content-type': "application/json",
						'content-type': "application/x-www-form-urlencoded"
					}, 
					success: (res) => {
						if(res.data.code==0){
							uni.getStorageSync('token', res.data.token);
							this.submitList=res.data.data;
						}else{
							uni.showToast({
							    title: res.data.msg,
							    duration: 2000
							});
						}
					}
				});
			},
			godetail(id) {
				uni.navigateTo({
					url:'./recordsDatail?id='+id
				});
				console.log(id);
			},
		}
	}
</script>

<style>
.submitRecords{
	flex-direction:row;
	display: block;
}
.records{
	flex-direction: column;
	width:690upx;
	margin: 30upx;
	height: 250upx;
	border-bottom-style: solid;
	border-bottom-width: 2upx;
	border-bottom-color: #f1f1f1;
}
.time{
	margin: 30upx;
	flex-direction: column;
}
.finish{
	margin-top: 30upx;
}
.money{
	margin-top: 30upx;
	margin-bottom: 30upx;
	flex-direction: row;
}
.moneycount{
	margin-top: 30upx;
	margin-bottom: 30upx;
	flex-direction: row;
	width: 130upx;
	text-align:right;
}
.texts{
	margin-top: 30upx;
	margin-bottom: 30upx;
	margin-left: 10upx;
	/* width: 35%; */
	color: #DD524D;
}
.detail{
	margin-top: 30upx;
	margin-bottom: 30upx;
	color: #0079C3;
	
	margin-right: 40upx;
	
	
}
page,
	view {
		display: flex;
	}
	
	page {
		display: flex;
		min-height: 100%;
		background-color:#FFFFFF;
	}
	
	template {
		display: flex;
		flex: 1;
	}
</style>
